<?php

require_once PHP_UI_PATH . DS . 'DataSetUIControl.php';
require_once PHP_UI_PATH . DS . 'DataSet.php';

/**
 * Description of Radio
 *
 * @author JeyDotC
 */
class CheckList extends DataSetUIControl implements DataSet {

    protected function getControlRendering() {
        $render = "<ul>";
        $i = 0;
        
        foreach ($this->getOptions() as $value => $opcion) {
            $render .= "
            <li>
            <input type='checkbox' value='$value' name='{$this->getName()}[$i]' id='_{$this->getName()}_$i' /> <label for='_{$this->getName()}_$i'>$opcion</label> 
            </li>
            ";
            $i++;
        }

        $render .= "</ul>";

        return $render;
    }

}

?>
